home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 8
/
FM Towns Free Software Collection 8.iso
/
t_os
/
artemis
/
artsrc2
/
grpcopy.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-01
|
913b
|
42 lines
/*
grpcopy.c
*/
#include <stdio.h>
#include <ryosuke.h>
#include <usrlib.h>
#include <egb.h>
extern char *EGB_work;
void grp_copy(int sx1, int sy1, int sxlen, int sylen, int sp,
int dx1, int dy1, int dp, int mode )
{
int n, sx2, sy2, dmy, nowpage;
char para[18], para2[8];
nowpage = grp_getWrtpage();
grp_setWrtpage( sp );
sx2 = sy1 + sxlen - 1;
sy2 = sy1 + sylen - 1;
WORD(para + 0) = 4;
WORD(para + 2) = sx1;
WORD(para + 4) = sy1;
WORD(para + 6) = sx1;
WORD(para + 8) = sy2;
WORD(para + 10) = sx2;
WORD(para + 12) = sy2;
WORD(para + 14) = sx2;
WORD(para + 16) = sy1;
n = 0x80;
EGB_region( EGB_work, &n, &dmy, &dmy, &dmy, &dmy, &dmy, para );
para2[0] = dp;
para2[1] = 0;
WORD(para2 + 2) = dx1 - sx1;
WORD(para2 + 4) = dy1 - sy1;
EGB_copy( EGB_work, 0, para2, NULL );
EGB_writePage( EGB_work, (int) nowpage );
}
/* end of grpcopy.c */